package sxe.core.struct;

import snobject.snObject;
import snobject.snObjectArgList;
import snobject.snString;
import snobject.snStruct;
import step.EvaluationFailure;
import step.FunctionWrapper;

public class get extends FunctionWrapper {

	@Override
	public snObject Call(snObjectArgList argv) throws EvaluationFailure,
			ClassCastException, ArrayIndexOutOfBoundsException {
		
		snStruct s = argv.popStruct();
		snString k = argv.popString();
		
		System.err.print("snStruct.get()");
		
		System.err.println();
		System.err.println("s.hasKey(" + k + ") = " + s.hasKey(k));
		
		return s.get(k);
	}

}
